home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
HAM Radio 1997
/
HAM Radio 1997.iso
/
vcls
/
moden
/
examples
/
extmain0.pas
< prev
next >
Wrap
Pascal/Delphi Source File
|
1996-04-08
|
2KB
|
65 lines
unit Extmain0;
interface
uses
SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls,
Forms, Dialogs, AdTerm, AdPort, StdCtrls;
type
TEXTMainForm = class(TForm)
ApdEmulator1: TApdEmulator;
ApdComPort1: TApdComPort;
ApdTerminal1: TApdTerminal;
procedure ApdTerminal1KeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
procedure WMGetMinMaxInfo(var Msg : TWMGetMinMaxInfo);
message WM_GETMINMAXINFO;
public
{ Public declarations }
end;
var
EXTMainForm: TEXTMainForm;
implementation
{$R *.DFM}
procedure TEXTMainForm.WMGetMinMaxInfo(var Msg : TWMGetMinMaxInfo);
var
FrameWidth : Word;
FrameHeight : Word;
NewWidth : Word;
NewHeight : Word;
begin
FrameWidth := Width - ClientWidth;
FrameHeight := Height - ClientHeight;
NewWidth := (ApdTerminal1.CharWidth * ApdTerminal1.Columns)
+ FrameWidth;
NewHeight := (ApdTerminal1.CharHeight * ApdTerminal1.PageHeight)
+ FrameHeight;
Msg.MinMaxInfo^.ptMaxSize.Y := NewHeight;
Msg.MinMaxInfo^.ptMaxSize.X := NewWidth;
Msg.MinMaxInfo^.ptMaxTrackSize.Y := NewHeight;
Msg.MinMaxInfo^.ptMaxTrackSize.X := NewWidth;
end;
procedure TEXTMainForm.ApdTerminal1KeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
begin
if Key = vk_Insert then
ApdTerminal1.ScrollBack := not ApdTerminal1.Scrollback;
end;
procedure TEXTMainForm.Button1Click(Sender: TObject);
begin
ApdComPort1.Output := 'xxx';
end;
end.